fix(desktop): resolve UI audit findings across native shell, bridge & web UI#89
Conversation
… web UI Systematic pass over the desktop UI (Tauri native shell + bridge + the reused web UI) addressing a multi-agent audit. Fixes all P1/P2 findings plus the bulk of P3s, grouped by the underlying patterns rather than one-off symptoms. Highlights: - Approvals survive reload/switch/reconnect: backend retains the request payload (webPendingApproval) and exposes GET /api/approval/pending; the store pulls and re-attaches pending approval cards via reconcileApprovals() alongside the existing ask_user reconcile — a pending approval no longer vanishes and hangs the agent. - Surface failures instead of swallowing them: WorkspacePicker switch errors, a backend-unreachable boot overlay with Retry, approval-resolve errors + double-submit guard, file-open and directory-load errors. - Switch hygiene: single loadWorkspaceState() shared by boot/setup/project-switch (no more drifting fetch sets); RightPanel Files/Changes remount on workspace change; ChatInput clears draft/images across sessions; unified post-switch handler so the inline picker and projects modal behave identically. - Desktop-shell specifics: drag strips for splash / setup / SSH wizard under the macOS overlay title bar; tool output is selectable/copyable in the shell; native folder picker distinguishes cancel vs unavailable and falls back. - Composer: hide the workspace switcher once a conversation has started (the task's workspace is fixed); keep the branch picker. - Consistency/a11y: TopBar status dot/label priority unified; terminal tabs no longer nest <button> and the close control is keyboard-reachable; sidebar archived-task toggle restored; inline task rename (window.prompt is unreliable in the webview); timer-leak cleanup in Settings. - Redundancy: delete unused MCPPanel.vue; drop dead exports / dead rootPath watch / dead setup base-URL code; tray left-click now restores a minimized window. Verified: vue-tsc, vite build, go build/vet/test (handler+web), cargo check, oxlint all clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR adds pending-approval persistence and reconnect reconciliation (backend ChangesApproval Reconciliation Workflow
Boot Flow, Connection Error, and Workspace Switching
Desktop Polish and UI Component Improvements
Sequence Diagram(s)sequenceDiagram
participant onMounted as App onMounted
participant boot
participant fetchHealth
participant loadWorkspaceState
participant reconcileApprovals as chat.reconcileApprovals
participant approvalPending as GET /api/approval/pending
participant ApprovalBanner
onMounted->>boot: await boot()
boot->>fetchHealth: probe /api/health
alt connection error
boot-->>onMounted: show connectionError overlay
else needs_setup
boot-->>onMounted: show SetupView
else ok
boot->>loadWorkspaceState: load config/models/channels
boot->>reconcileApprovals: on session restore/load
reconcileApprovals->>approvalPending: GET /api/approval/pending
approvalPending-->>reconcileApprovals: []ApprovalRequestData
reconcileApprovals-->>ApprovalBanner: inject missing approval cards
end
Note over ApprovalBanner: approval.resolving=true disables buttons
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Related Issues / Tickets
Type of Change
Changes Made
webPendingApproval{ch,data}) and exposesGET /api/approval/pending(PendingApprovalRequests); the store pulls and re-attaches pending approval cards viareconcileApprovals()alongside the existingask_userreconcile. A pending approval no longer disappears and leaves the agent hung.loadWorkspaceState()shared by boot/setup/project-switch (the three previously fetched different subsets); RightPanel Files/Changes remount on workspace change; ChatInput clears draft/images across sessions; one unified post-switch handler so the inline picker and the projects modal behave identically.<button>and the close control is keyboard-reachable; sidebar archived-task toggle restored; inline task rename (window.promptis unreliable in the webview); MCP login message scoped to its server; SetupView provider-switch clears stale key + validation; tray left-click restores a minimized window; Esc no longer kills the run while a modal is open.MCPPanel.vue; remove dead exports / deadrootPathwatch / dead setup base-URL code; clean up the channel-poll timer leak in Settings.Testing
npx vue-tsc --build— cleannpx vite build— clean (pre-existing chunk-size warning only)go build ./...,go vet ./internal/handler ./internal/web,go test ./internal/handler ./internal/web— all passcargo check(desktop/src-tauri) — cleannpx oxlint src/— 0 warnings / 0 errorsScreenshots / Recordings
N/A — behavioral/state fixes; verified via build + tests (full-stack runtime needs the Go sidecar).
Checklist
Additional Notes
Consciously deferred (with rationale, not regressions):
client_id/scopesin the list response (andclient_secretmust never be round-tripped), a backend redesign with security implications rather than a safe quick edit.useBranchwindow listeners — an intentional app-lifetime singleton (bounded, non-growing), so a ref-counted teardown adds risk for negligible benefit.🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Improvements